<script>
import { h } from "vue";
import HelloWorld from "./HelloWorld.vue";

export default {
  render() {
    return h("div", { class: "render-slot" }, [
      "RenderSlot组件",
      h(HelloWorld, null, {
        default: (props) =>
          h(
            "span",
            null,
            `传入HelloWorld插槽中的内容，插槽Props的name: ${props.name}`
          ),
      }),
    ]);
  },
};
</script>

<style scoped>
.render-slot {
  border: 1px solid #ddd;
  margin: 8px;
}
</style>
